﻿//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Web;
//using System.Web.Mvc;
//using LOMBARDISPICK.Domain.Services;
//using LOMBARDISPICK.Web.Helpers;

//namespace LOMBARDISPICK.Web.Controllers
//{
//    public class ReportController : BaseController
//    {
//        //private readonly IReportService report;
//        private readonly ICUSTOMERService customerService;
//        //View Data
//        private readonly IMONTH_AND_YEARService MonthAndYearService;
//        private readonly IJOBService jobService;
//        private readonly IVERSION_AND_USER_ROLE_CONTROLService versionAndUserRoleControlService;
//        private readonly INETWORK_CONTROLLERService networkControllerService;
//        private readonly ISYSTEM_EQUIPMENTService systemEquipmentService;
//        private readonly ISYSTEM_CONTROLLERService systemControllerService;
//        private readonly IReportService reportService;
//        private readonly IEMPLOYEE_PREFERENCESService EmployeePreference;
//        private readonly int CurrentVersion;


//        public ReportController(
//            ICUSTOMERService customerService,
//            IMONTH_AND_YEARService MonthAndYearService,
//            IJOBService jobService,
//            IVERSION_AND_USER_ROLE_CONTROLService versionAndUserRoleControlService,
//            INETWORK_CONTROLLERService networkControllerService,
//            ISYSTEM_EQUIPMENTService systemEquipmentService,
//            ISYSTEM_CONTROLLERService systemControllerService,
//            IReportService reportService,
//            IEMPLOYEE_PREFERENCESService EmployeePreference
//            )
//        {
//            this.customerService = customerService;
//            this.MonthAndYearService = MonthAndYearService;
//            this.jobService = jobService;
//            this.versionAndUserRoleControlService = versionAndUserRoleControlService;
//            this.networkControllerService = networkControllerService;
//            this.systemEquipmentService = systemEquipmentService;
//            this.systemControllerService = systemControllerService;
//            this.reportService = reportService;
//            this.EmployeePreference = EmployeePreference;
//            this.CurrentVersion = EmployeePreference.getCurrentVersionAndUserRoleControl();
//        }

//        #region Estimating
//        #region InputOutputListing
//        [View]
//        public ActionResult InputOutputListing(int customer = 0, int job = 0, int version = 0)
//        {
//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");

//            if (customer == 0)
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = false;
//                ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            }
//            else
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = true;
//                ViewData["CUSTOMER_ID"] = customerService.ViewDataSelectListsWithDefaultValue(customer);
//                var jobSelectList = new SelectList(this.jobService.GetAllJobByCustomer(customer), "Value", "Text", job);
//                ViewData["JOB_ID"] = jobSelectList;
//                var versionSelectList = new SelectList(this.versionAndUserRoleControlService.GetAllVersionAndUserRoleControlByJob(job), "Value", "Text", version);
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = versionSelectList;
//            }

//            return View();
//        }

//        [View]
//        [HttpPost]
//        public ActionResult InputOutputListing(FormCollection form)
//        {
//            //pull in values from the user form
//            int job = int.Parse(form.Get("JOB_ID"));
//            String reportFormat = form.Get("REPORT_FORMAT").ToString();
//            String version = form.Get("VERSION_AND_USER_ROLE_CONTROL_ID").ToString();

//            return Redirect("http://LombardisPick/ReportServer?/Estimating/InputOutputListing&rs:Command=Render&rs:Format=" + reportFormat + "&rc:Parameters=false&JOB_ID=" + job + "&VERSION_AND_USER_ROLE_CONTROL_ID=" + version);

//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");
//            ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");

//            return View();
//        }
//        #endregion

//        //#region PriceSheet
//        //[View]
//        //public ActionResult PriceSheet(int customer = 0, int job = 0, int version = 0)
//        //{
//        //    ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");
//        //    ViewData["NETWORK_CONTROLLER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//        //    ViewData["SYSTEM_EQUIPMENT_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//        //    ViewData["SYSTEM_CONTROLLER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");

//        //    if (customer == 0)
//        //    {
//        //        ViewData["KeyInformationProvidedOnPageLoad"] = false;
//        //        ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//        //        ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//        //        ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//        //    }
//        //    else
//        //    {
//        //        ViewData["KeyInformationProvidedOnPageLoad"] = true;
//        //        ViewData["CUSTOMER_ID"] = customerService.ViewDataSelectListsWithDefaultValue(customer);
//        //        var jobSelectList = new SelectList(this.jobService.GetAllJobByCustomer(customer), "Value", "Text", job);
//        //        ViewData["JOB_ID"] = jobSelectList;
//        //        var versionSelectList = new SelectList(this.versionAndUserRoleControlService.GetAllVersionAndUserRoleControlByJob(job), "Value", "Text", version);
//        //        ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = versionSelectList;
//        //    }

//        //    return View();
//        //}

//        //[View]
//        //[HttpPost]
//        //public ActionResult PriceSheet(FormCollection form)
//        //{
//        //    //pull in values from the user form
//        //    int job = int.Parse(form.Get("JOB_ID"));
//        //    String reportFormat = form.Get("REPORT_FORMAT").ToString();
//        //    int systemController = int.Parse(form.Get("SYSTEM_CONTROLLER_ID"));
//        //    int systemEquipment = int.Parse(form.Get("SYSTEM_EQUIPMENT_ID"));

//        //    return Redirect("http://LombardisPick/ReportServer?/Estimating/PriceSheet&rs:Command=Render&rs:Format=" + reportFormat + "&rc:Parameters=false&SYSTEM_EQUIPMENT_ID=" + systemEquipment);

//        //    ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");
//        //    ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//        //    ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//        //    ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//        //    ViewData["NETWORK_CONTROLLER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//        //    ViewData["SYSTEM_EQUIPMENT_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//        //    ViewData["SYSTEM_CONTROLLER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");

//        //    return View();
//        //}
//        //#endregion
//        //#region EstimatingPriceSheet
//        //[View]
//        //public ActionResult EstimatingPriceSheet(int customer = 0, int job = 0, int version = 0)
//        //{
//        //    ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");

//        //    if (customer == 0)
//        //    {
//        //        ViewData["KeyInformationProvidedOnPageLoad"] = false;
//        //        ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//        //        ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//        //        ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//        //    }
//        //    else
//        //    {
//        //        ViewData["KeyInformationProvidedOnPageLoad"] = true;
//        //        ViewData["CUSTOMER_ID"] = customerService.ViewDataSelectListsWithDefaultValue(customer);
//        //        var jobSelectList = new SelectList(this.jobService.GetAllJobByCustomer(customer), "Value", "Text", job);
//        //        ViewData["JOB_ID"] = jobSelectList;
//        //        var versionSelectList = new SelectList(this.versionAndUserRoleControlService.GetAllVersionAndUserRoleControlByJob(job), "Value", "Text", version);
//        //        ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = versionSelectList;
//        //    }

//        //    return View();
//        //}

//        //[View]
//        //[HttpPost]
//        //public ActionResult EstimatingPriceSheet(FormCollection form)
//        //{
//        //    //pull in values from the user form
//        //    int job = int.Parse(form.Get("JOB_ID"));
//        //    String reportFormat = form.Get("REPORT_FORMAT").ToString();
//        //    String version = form.Get("VERSION_AND_USER_ROLE_CONTROL_ID").ToString();

//        //    return Redirect("http://LombardisPick/ReportServer?/Estimating/EstimatingPriceSheet&rs:Command=Render&rs:Format=" + reportFormat + "&rc:Parameters=false&JOB_ID=" + job + "&VERSION_AND_USER_ROLE_CONTROL_ID=" + version);

//        //    ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");
//        //    ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//        //    ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//        //    ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");

//        //    return View();
//        //}
//        //#endregion
//        #region EstimatingWiring
//        [View]
//        public ActionResult EstimatingWiring(int customer = 0, int job = 0, int version = 0)
//        {
//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");

//            if (customer == 0)
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = false;
//                ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            }
//            else
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = true;
//                ViewData["CUSTOMER_ID"] = customerService.ViewDataSelectListsWithDefaultValue(customer);
//                var jobSelectList = new SelectList(this.jobService.GetAllJobByCustomer(customer), "Value", "Text", job);
//                ViewData["JOB_ID"] = jobSelectList;
//                var versionSelectList = new SelectList(this.versionAndUserRoleControlService.GetAllVersionAndUserRoleControlByJob(job), "Value", "Text", version);
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = versionSelectList;
//            }

//            return View();
//        }

//        [View]
//        [HttpPost]
//        public ActionResult EstimatingWiring(FormCollection form)
//        {
//            //pull in values from the user form
//            int job = int.Parse(form.Get("JOB_ID"));
//            int customer = int.Parse(form.Get("CUSTOMER_ID"));
//            String reportFormat = form.Get("REPORT_FORMAT").ToString();
//            String version = form.Get("VERSION_AND_USER_ROLE_CONTROL_ID").ToString();

//            return Redirect("http://LombardisPick/ReportServer?/Estimating/EstimatingWiring&rs:Command=Render&rs:Format=" + reportFormat + "&rc:Parameters=false&JOB_ID=" + job + "&VERSION_AND_USER_ROLE_CONTROL_ID=" + version + "&CUSTOMER_ID=" + customer);

//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");
//            ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");

//            return View();
//        }
//        #endregion
//        #region EstimatingDamper
//        [View]
//        public ActionResult EstimatingDamper(int customer = 0, int job = 0, int version = 0)
//        {
//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");

//            if (customer == 0)
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = false;
//                ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            }
//            else
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = true;
//                ViewData["CUSTOMER_ID"] = customerService.ViewDataSelectListsWithDefaultValue(customer);
//                var jobSelectList = new SelectList(this.jobService.GetAllJobByCustomer(customer), "Value", "Text", job);
//                ViewData["JOB_ID"] = jobSelectList;
//                var versionSelectList = new SelectList(this.versionAndUserRoleControlService.GetAllVersionAndUserRoleControlByJob(job), "Value", "Text", version);
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = versionSelectList;
//            }

//            return View();
//        }

//        [View]
//        [HttpPost]
//        public ActionResult EstimatingDamper(FormCollection form)
//        {
//            //pull in values from the user form
//            int job = int.Parse(form.Get("JOB_ID"));
//            int customer = int.Parse(form.Get("CUSTOMER_ID"));
//            String reportFormat = form.Get("REPORT_FORMAT").ToString();
//            String version = form.Get("VERSION_AND_USER_ROLE_CONTROL_ID").ToString();

//            return Redirect("http://LombardisPick/ReportServer?/Estimating/EstimatingDamper&rs:Command=Render&rs:Format=" + reportFormat + "&rc:Parameters=false&JOB_ID=" + job + "&VERSION_AND_USER_ROLE_CONTROL_ID=" + version + "&CUSTOMER_ID=" + customer);

//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");
//            ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");

//            return View();
//        }
//        #endregion
//        #region EstimatingValve
//        [View]
//        public ActionResult EstimatingValve(int customer = 0, int job = 0, int version = 0)
//        {
//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");

//            if (customer == 0)
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = false;
//                ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            }
//            else
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = true;
//                ViewData["CUSTOMER_ID"] = customerService.ViewDataSelectListsWithDefaultValue(customer);
//                var jobSelectList = new SelectList(this.jobService.GetAllJobByCustomer(customer), "Value", "Text", job);
//                ViewData["JOB_ID"] = jobSelectList;
//                var versionSelectList = new SelectList(this.versionAndUserRoleControlService.GetAllVersionAndUserRoleControlByJob(job), "Value", "Text", version);
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = versionSelectList;
//            }

//            return View();
//        }

//        [View]
//        [HttpPost]
//        public ActionResult EstimatingValve(FormCollection form)
//        {
//            //pull in values from the user form
//            int job = int.Parse(form.Get("JOB_ID"));
//            int customer = int.Parse(form.Get("CUSTOMER_ID"));
//            String reportFormat = form.Get("REPORT_FORMAT").ToString();
//            String version = form.Get("VERSION_AND_USER_ROLE_CONTROL_ID").ToString();

//            return Redirect("http://LombardisPick/ReportServer?/Estimating/EstimatingValve&rs:Command=Render&rs:Format=" + reportFormat + "&rc:Parameters=false&JOB_ID=" + job + "&VERSION_AND_USER_ROLE_CONTROL_ID=" + version + "&CUSTOMER_ID=" + customer);

//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");
//            ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");

//            return View();
//        }
//        #endregion
//        #region EstimatingSummary
//        [View]
//        public ActionResult EstimatingSummary(int customer = 0, int job = 0, int version = 0)
//        {
//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");

//            if (customer == 0)
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = false;
//                ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            }
//            else
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = true;
//                ViewData["CUSTOMER_ID"] = customerService.ViewDataSelectListsWithDefaultValue(customer);
//                var jobSelectList = new SelectList(this.jobService.GetAllJobByCustomer(customer), "Value", "Text", job);
//                ViewData["JOB_ID"] = jobSelectList;
//                var versionSelectList = new SelectList(this.versionAndUserRoleControlService.GetAllVersionAndUserRoleControlByJob(job), "Value", "Text", version);
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = versionSelectList;
//            }

//            return View();
//        }

//        [View]
//        [HttpPost]
//        public ActionResult EstimatingSummary(FormCollection form)
//        {
//            //pull in values from the user form
//            int job = int.Parse(form.Get("JOB_ID"));
//            int customer = int.Parse(form.Get("CUSTOMER_ID"));
//            String reportFormat = form.Get("REPORT_FORMAT").ToString();
//            String version = form.Get("VERSION_AND_USER_ROLE_CONTROL_ID").ToString();

//            return Redirect("http://LombardisPick/ReportServer?/Estimating/EstimatingSummary&rs:Command=Render&rs:Format=" + reportFormat + "&rc:Parameters=false&jobId=" + job + "&versionId=" + version + "&customerId=" + customer);

//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");
//            ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");

//            return View();
//        }
//        #endregion
//        #region EstimatingToEngineeringHandoff
//        [View]
//        public ActionResult EstimatingToEngineeringHandoff(int customer = 0, int job = 0, int version = 0)
//        {
//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");

//            if (customer == 0)
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = false;
//                ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            }
//            else
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = true;
//                ViewData["CUSTOMER_ID"] = customerService.ViewDataSelectListsWithDefaultValue(customer);
//                var jobSelectList = new SelectList(this.jobService.GetAllJobByCustomer(customer), "Value", "Text", job);
//                ViewData["JOB_ID"] = jobSelectList;
//                var versionSelectList = new SelectList(this.versionAndUserRoleControlService.GetAllVersionAndUserRoleControlByJob(job), "Value", "Text", version);
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = versionSelectList;
//            }

//            return View();
//        }

//        [View]
//        [HttpPost]
//        public ActionResult EstimatingToEngineeringHandoff(FormCollection form)
//        {
//            //pull in values from the user form
//            int job = int.Parse(form.Get("JOB_ID"));
//            int customer = int.Parse(form.Get("CUSTOMER_ID"));
//            String reportFormat = form.Get("REPORT_FORMAT").ToString();
//            String version = form.Get("VERSION_AND_USER_ROLE_CONTROL_ID").ToString();

//            return Redirect("http://LombardisPick/ReportServer?/Estimating/EstimatingToEngineeringHandoff&rs:Command=Render&rs:Format=" + reportFormat + "&rc:Parameters=false&JobId=" + job + "&VersionId=" + version + "&CustomerId=" + customer);

//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");
//            ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");

//            return View();
//        }
//        #endregion
//        #region EstimatingLaborHours
//        [View]
//        public ActionResult EstimatingLaborHours(int customer = 0, int job = 0, int version = 0)
//        {
//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");

//            if (customer == 0)
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = false;
//                ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            }
//            else
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = true;
//                ViewData["CUSTOMER_ID"] = customerService.ViewDataSelectListsWithDefaultValue(customer);
//                var jobSelectList = new SelectList(this.jobService.GetAllJobByCustomer(customer), "Value", "Text", job);
//                ViewData["JOB_ID"] = jobSelectList;
//                var versionSelectList = new SelectList(this.versionAndUserRoleControlService.GetAllVersionAndUserRoleControlByJob(job), "Value", "Text", version);
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = versionSelectList;
//            }

//            return View();
//        }

//        [View]
//        [HttpPost]
//        public ActionResult EstimatingLaborHours(FormCollection form)
//        {
//            //pull in values from the user form
//            int job = int.Parse(form.Get("JOB_ID"));
//            int customer = int.Parse(form.Get("CUSTOMER_ID"));
//            String reportFormat = form.Get("REPORT_FORMAT").ToString();
//            String version = form.Get("VERSION_AND_USER_ROLE_CONTROL_ID").ToString();

//            return Redirect("http://LombardisPick/ReportServer?/Estimating/EstimatingLaborHours&rs:Command=Render&rs:Format=" + reportFormat + "&rc:Parameters=false&jobId=" + job + "&versionId=" + version);

//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");
//            ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");

//            return View();
//        }
//        #endregion
//        #region EstimatingMaterialCost
//        [View]
//        public ActionResult EstimatingMaterialCost(int customer = 0, int job = 0, int version = 0)
//        {
//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");

//            if (customer == 0)
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = false;
//                ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            }
//            else
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = true;
//                ViewData["CUSTOMER_ID"] = customerService.ViewDataSelectListsWithDefaultValue(customer);
//                var jobSelectList = new SelectList(this.jobService.GetAllJobByCustomer(customer), "Value", "Text", job);
//                ViewData["JOB_ID"] = jobSelectList;
//                var versionSelectList = new SelectList(this.versionAndUserRoleControlService.GetAllVersionAndUserRoleControlByJob(job), "Value", "Text", version);
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = versionSelectList;
//            }

//            return View();
//        }

//        [View]
//        [HttpPost]
//        public ActionResult EstimatingMaterialCost(FormCollection form)
//        {
//            //pull in values from the user form
//            int job = int.Parse(form.Get("JOB_ID"));
//            int customer = int.Parse(form.Get("CUSTOMER_ID"));
//            String reportFormat = form.Get("REPORT_FORMAT").ToString();
//            String version = form.Get("VERSION_AND_USER_ROLE_CONTROL_ID").ToString();

//            return Redirect("http://LombardisPick/ReportServer?/Estimating/EstimatingMaterialCost&rs:Command=Render&rs:Format=" + reportFormat + "&rc:Parameters=false&JobId=" + job + "&VersionId=" + version);

//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");
//            ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");

//            return View();
//        }
//        #endregion




//        #region MaterialsOnJob
//        [View]
//        public ActionResult MaterialsOnJob(int customer = 0, int job = 0, int version = 0)
//        {
//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");

//            if (customer == 0)
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = false;
//                ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            }
//            else
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = true;
//                ViewData["CUSTOMER_ID"] = customerService.ViewDataSelectListsWithDefaultValue(customer);
//                var jobSelectList = new SelectList(this.jobService.GetAllJobByCustomer(customer), "Value", "Text", job);
//                ViewData["JOB_ID"] = jobSelectList;
//                var versionSelectList = new SelectList(this.versionAndUserRoleControlService.GetAllVersionAndUserRoleControlByJob(job), "Value", "Text", version);
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = versionSelectList;
//            }

//            return View();
//        }

//        [View]
//        [HttpPost]
//        public ActionResult MaterialsOnJob(FormCollection form)
//        {
//            //pull in values from the user form
//            int job = int.Parse(form.Get("JOB_ID"));
//            int customer = int.Parse(form.Get("CUSTOMER_ID"));
//            String reportFormat = form.Get("REPORT_FORMAT").ToString();
//            String version = form.Get("VERSION_AND_USER_ROLE_CONTROL_ID").ToString();

//            return Redirect("http://LombardisPick/ReportServer?/Parts/MaterialsOnJob&rs:Command=Render&rs:Format=" + reportFormat + "&rc:Parameters=false&JobId=" + job + "&VersionId=" + version + "&CustomerId=" + customer);

//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");
//            ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");

//            return View();
//        }
//        #endregion

//        #endregion

//        #region Engineering

//        #region EngineeringInputOutputSheet
//        [View]
//        public ActionResult EngineeringInputOutputSheet(int customer = 0, int job = 0, int version = 0)
//        {
//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");

//            if (customer == 0)
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = false;
//                ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            }
//            else
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = true;
//                ViewData["CUSTOMER_ID"] = customerService.ViewDataSelectListsWithDefaultValue(customer);
//                var jobSelectList = new SelectList(this.jobService.GetAllJobByCustomer(customer), "Value", "Text", job);
//                ViewData["JOB_ID"] = jobSelectList;
//                var versionSelectList = new SelectList(this.versionAndUserRoleControlService.GetAllVersionAndUserRoleControlByJob(job), "Value", "Text", version);
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = versionSelectList;
//            }

//            return View();
//        }

//        [View]
//        [HttpPost]
//        public ActionResult EngineeringInputOutputSheet(FormCollection form)
//        {
//            //pull in values from the user form
//            int job = int.Parse(form.Get("JOB_ID"));
//            int version = int.Parse(form.Get("VERSION_AND_USER_ROLE_CONTROL_ID"));
//            String reportFormat = form.Get("REPORT_FORMAT").ToString();

//            return Redirect("http://LombardisPick/ReportServer?/Engineering/InputOutputSheet&rs:Command=Render&rs:Format=" + reportFormat + "&rc:Parameters=false&JOB_ID=" + job + "&VERSION_AND_USER_ROLE_CONTROL_ID=" + version);

//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");
//            ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");

//            return View();
//        }
//        #endregion
//        #region EngineeringIsebControllersCsv
//        [View]
//        public ActionResult EngineeringIsebControllersCsv(int customer = 0, int job = 0, int version = 0)
//        {
//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypesCSV(), "Value", "Text");

//            if (customer == 0)
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = false;
//                ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            }
//            else
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = true;
//                ViewData["CUSTOMER_ID"] = customerService.ViewDataSelectListsWithDefaultValue(customer);
//                var jobSelectList = new SelectList(this.jobService.GetAllJobByCustomer(customer), "Value", "Text", job);
//                ViewData["JOB_ID"] = jobSelectList;
//                var versionSelectList = new SelectList(this.versionAndUserRoleControlService.GetAllVersionAndUserRoleControlByJob(job), "Value", "Text", version);
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = versionSelectList;
//            }

//            return View();
//        }

//        [View]
//        [HttpPost]
//        public ActionResult EngineeringIsebControllersCsv(FormCollection form)
//        {
//            //pull in values from the user form
//            int job = int.Parse(form.Get("JOB_ID"));
//            int version = int.Parse(form.Get("VERSION_AND_USER_ROLE_CONTROL_ID"));
//            String reportFormat = form.Get("REPORT_FORMAT").ToString();

//            return Redirect("http://LombardisPick/ReportServer?/Engineering/IsebControllersCsv&rs:Command=Render&rs:Format=" + reportFormat + "&rc:Parameters=false&JOB_ID=" + job + "&VERSION_AND_USER_ROLE_CONTROL_ID=" + version);

//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypesCSV(), "Value", "Text");
//            ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");

//            return View();
//        }
//        #endregion
//        #region EngineeringIsebInputCsv
//        [View]
//        public ActionResult EngineeringIsebInputCsv(int customer = 0, int job = 0, int version = 0)
//        {
//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypesCSV(), "Value", "Text");

//            if (customer == 0)
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = false;
//                ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            }
//            else
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = true;
//                ViewData["CUSTOMER_ID"] = customerService.ViewDataSelectListsWithDefaultValue(customer);
//                var jobSelectList = new SelectList(this.jobService.GetAllJobByCustomer(customer), "Value", "Text", job);
//                ViewData["JOB_ID"] = jobSelectList;
//                var versionSelectList = new SelectList(this.versionAndUserRoleControlService.GetAllVersionAndUserRoleControlByJob(job), "Value", "Text", version);
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = versionSelectList;
//            }

//            return View();
//        }

//        [View]
//        [HttpPost]
//        public ActionResult EngineeringIsebInputCsv(FormCollection form)
//        {
//            //pull in values from the user form
//            int job = int.Parse(form.Get("JOB_ID"));
//            int version = int.Parse(form.Get("VERSION_AND_USER_ROLE_CONTROL_ID"));
//            String reportFormat = form.Get("REPORT_FORMAT").ToString();

//            return Redirect("http://LombardisPick/ReportServer?/Engineering/IsebInputCsv&rs:Command=Render&rs:Format=" + reportFormat + "&rc:Parameters=false&JOB_ID=" + job + "&VERSION_AND_USER_ROLE_CONTROL_ID=" + version);

//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypesCSV(), "Value", "Text");
//            ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");

//            return View();
//        }
//        #endregion
//        #region EngineeringIsebOutputCsv
//        [View]
//        public ActionResult EngineeringIsebOutputCsv(int customer = 0, int job = 0, int version = 0)
//        {
//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypesCSV(), "Value", "Text");

//            if (customer == 0)
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = false;
//                ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            }
//            else
//            {
//                ViewData["KeyInformationProvidedOnPageLoad"] = true;
//                ViewData["CUSTOMER_ID"] = customerService.ViewDataSelectListsWithDefaultValue(customer);
//                var jobSelectList = new SelectList(this.jobService.GetAllJobByCustomer(customer), "Value", "Text", job);
//                ViewData["JOB_ID"] = jobSelectList;
//                var versionSelectList = new SelectList(this.versionAndUserRoleControlService.GetAllVersionAndUserRoleControlByJob(job), "Value", "Text", version);
//                ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = versionSelectList;
//            }

//            return View();
//        }

//        [View]
//        [HttpPost]
//        public ActionResult EngineeringIsebOutputCsv(FormCollection form)
//        {
//            //pull in values from the user form
//            int job = int.Parse(form.Get("JOB_ID"));
//            int version = int.Parse(form.Get("VERSION_AND_USER_ROLE_CONTROL_ID"));
//            String reportFormat = form.Get("REPORT_FORMAT").ToString();

//            return Redirect("http://LombardisPick/ReportServer?/Engineering/IsebOutputCsv&rs:Command=Render&rs:Format=" + reportFormat + "&rc:Parameters=false&JOB_ID=" + job + "&VERSION_AND_USER_ROLE_CONTROL_ID=" + version);

//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypesCSV(), "Value", "Text");
//            ViewData["CUSTOMER_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["JOB_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");
//            ViewData["VERSION_AND_USER_ROLE_CONTROL_ID"] = new SelectList(Enumerable.Empty<SelectListItem>(), "Value", "Text");

//            return View();
//        }
//        #endregion

//        #endregion

//        #region ProjectManagement
//        [View]
//        public ActionResult ProjectManagementBasOps()
//        {
//            ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");
//            ViewData["DATE_DROP_DOWN"] = new SelectList(this.MonthAndYearService.getMONTH_AND_YEARItems(), "Value", "Text");

//            return View();
//        }

//        [View]
//        [HttpPost]
//        public ActionResult ProjectManagementBasOps(FormCollection form)
//        {
//            if (this.EmployeePreference.IsCurrentUserAuthorizedToViewOpsReport())
//            {
//                //pull in values from the user form
//                String reportFormat = form.Get("REPORT_FORMAT").ToString();
//                DateTime dateForReport = DateTime.ParseExact((form.Get("DATE_DROP_DOWN")).ToString(), "yyyy-MM", null);


//                return Redirect("http://LombardisPick/ReportServer?/ProjectManagement/ProjectManagementBasOps&rs:Command=Render&rs:Format=" + reportFormat + "&rc:Parameters=false&REPORT_DATE=" + dateForReport);

//                ViewData["REPORT_FORMAT"] = new SelectList(this.reportService.getReportTypes(), "Value", "Text");
//                ViewData["DATE_DROP_DOWN"] = new SelectList(this.MonthAndYearService.getMONTH_AND_YEARItems(), "Value", "Text");

//                return View();
//            }
//            else
//            {
//                return RedirectToAction("ProjectManagementBasOps");
//            }
//        }
//        #endregion
//    }
//}
